<?php

include ('top.ajax.php');

	if($_POST['type']=='category') {
	$category=new Category($_POST['id']);
	$subcategories=$category->getSubCategories();
	$tpl->assign('subcategories',$subcategories);
	$tpl->display("ajax/subcategories.tpl");
	
	
	
	}

	if($_POST['type']=='subcategory') {
	$subcategory=new Subcategory($_POST['id']);
	$subsubcategories=$subcategory->getSubSubCategories();
	$tpl->assign('subsubcategories',$subsubcategories);
	$tpl->display("ajax/subsubcategories.tpl");
     }
	 

?>